home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
emstools.arc
/
EMMLIB.ARC
/
EMM26_B.ASM
< prev
next >
Wrap
Assembly Source File
|
1990-02-04
|
5KB
|
92 lines
;-----------------------------------------------------------------------------;
; MODULE NAME: EMM26_B.ASM ;
; ;
; FUNCTION NAME: get_alloc_raw_page_count ;
; ;
; DESCRIPTION: This function returns the number of allocated ;
; non-standard length pages within expanded memory to the ;
; operating system. ;
; ;
; One variety of expanded memory board has a page size ;
; which is a sub-multiple of 16K bytes. An expanded ;
; memory page which is a sub-multiple of 16K is termed a ;
; raw page. An operating system may deal with mappable ;
; physical page sizes which are sub-multiples of 16K ;
; bytes. ;
; ;
; If the expanded memory board supplies pages in exact ;
; multiples of 16K bytes, the number of pages this ;
; function returns is identical to the number the ;
; get_unalloc_page_count function returns. In this case, ;
; there is no difference between a page and a raw page. ;
; ;
; PASSED: &alloc_raw_pages: ;
; is a far pointer to a count of the number of raw ;
; pages that are currently unavailable for use. ;
; ;
; RETURNED: status: ;
; is the status EMM returns from the call. All other ;
; returned results are valid only if the status ;
; returned is zero. Otherwise they are undefined. ;
; ;
; alloc_raw_pages: ;
; is a count of the number of raw pages that are ;
; currently unavailable for use. ;
; ;
; C USE CONVENTION: unsigned int status; ;
; unsigned int alloc_raw_pages; ;
; ;
; status = get_alloc_raw_page_count (&alloc_raw_pages); ;
;-----------------------------------------------------------------------------;
.XLIST
PAGE 60,132
IFDEF SMALL
.MODEL SMALL, C
ENDIF
IFDEF MEDIUM
.MODEL MEDIUM, C
ENDIF
IFDEF LARGE
.MODEL LARGE, C
ENDIF
IFDEF COMPACT
.MODEL COMPACT, C
ENDIF
IFDEF HUGE
.MODEL HUGE, C
ENDIF
INCLUDE emmlib.equ
INCLUDE emmlib.str
INCLUDE emmlib.mac
.LIST
.CODE
get_alloc_raw_page_count PROC \
ptr_alloc_raw_pages:FAR PTR WORD
;---------------------------------------------------------------------;
; do; ;
; . get the number of allocated RAW pages from EMM; ;
;---------------------------------------------------------------------;
MOVE AX, get_unallocated_raw_pg_cnt_fcn
INT EMM_int
;---------------------------------------------------------------------;
; . pass the allocated RAW page count back to the caller; ;
;---------------------------------------------------------------------;
SUB DX, BX
MOVE ES:BX, ptr_alloc_raw_pages
MOVE ES:[BX], DX
;---------------------------------------------------------------------;
; . return (EMM status); ;
; end; ;
;---------------------------------------------------------------------;
RET_EMM_STAT AH
get_alloc_raw_page_count ENDP
END